Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add coverage for client._addHandle() #8518

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Sep 13, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test debugger

Description of change

Client.prototype._addHandle() in the _debugger module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

@Trott Trott added debugger test Issues and PRs related to the tests. labels Sep 13, 2016
@bnoordhuis
Copy link
Member

LGTM. s/covereage/coverage/ in the commit log.

@thefourtheye
Copy link
Contributor

Can you include some bad cases as well? Like NaN, 3.14, -1, Infinities, Zeroes...

@Trott
Copy link
Member Author

Trott commented Sep 13, 2016

Can you include some bad cases as well? Like NaN, 3.14, -1, Infinities, Zeroes...

Except for the last two, these are all bad cases. I can add more, I suppose.

`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.
@Trott Trott changed the title test: add covereage for client._addHandle() test: add coverage for client._addHandle() Sep 13, 2016
@Trott
Copy link
Member Author

Trott commented Sep 13, 2016

@thefourtheye Of course, I go and add {handle: NaN} and immediately discover buggy behavior. :-|

@Trott
Copy link
Member Author

Trott commented Sep 13, 2016

@thefourtheye I'm inclined to not include those at this time because:

  • the resulting behavior is unexpected to me but...
  • ...it is not always clear to me that this is necessarily a bug and...
  • ...test coverage in the _debugger module is currently lacking.

So, I'd rather get these tests in as is. If we want to handle (for example) NaN, then that is a bugfix that (in my opinion) should be added separately so that (for one thing) if it needs to be reverted, we're not reverting all these other tests too.

At least, that's what I'm thinking at the moment. Does that work for you?

Good eye for the edge cases, gotta say.

@thefourtheye
Copy link
Contributor

Okay. We can discuss that in a separate PR. This LGTM.

@cjihrig
Copy link
Contributor

cjihrig commented Sep 14, 2016

LGTM

@Trott
Copy link
Member Author

Trott commented Sep 14, 2016

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Trott added a commit to Trott/io.js that referenced this pull request Sep 16, 2016
`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

PR-URL: nodejs#8518
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member Author

Trott commented Sep 16, 2016

Landed in a01c365

@Trott Trott closed this Sep 16, 2016
MylesBorins pushed a commit that referenced this pull request Oct 6, 2016
`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

PR-URL: #8518
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 10, 2016
`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

PR-URL: #8518
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

PR-URL: #8518
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
rvagg pushed a commit that referenced this pull request Oct 18, 2016
`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

PR-URL: #8518
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 26, 2016
`Client.prototype._addHandle()` in the `_debugger` module has conditions
around invalid properties that are not currently tested. This change
adds some minimal unit tests.

PR-URL: #8518
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Oct 26, 2016
@Trott Trott deleted the addhandle branch January 13, 2022 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants